package com.nlscan.ncomgateway.core.common

/**
 * <pre>
 *  author: lin.qing
 *  time  : 2023/3/29
 *  desc  : 存放App定义的状态值
 * </pre>
 */
object AppState {

    /**
     * 列表显示模式切换
     */
    const val SHOW_MODE_NORMAL = 0
    const val SHOW_MODE_EDIT = 1

    /*
        之前根据默认值来定义状态值，
        ScanSettings#public static final int VALUE_OUT_PUT_MODE_FILLING = getIntFieldValue("VALUE_OUT_PUT_MODE_FILLING", 3);
        实际上值是定义在
        ScanSettingValues#
            public static final int VALUE_OUT_PUT_MODE_FILLING = 1;
            public static final int VALUE_OUT_PUT_MODE_EMULATE_KEY = 2;
            public static final int VALUE_OUT_PUT_MODE_BROADCAST = 3;
            public static final int VALUE_OUT_PUT_MODE_API = 4;

        历史遗留问题，定义了两套状态值，默认值是为了兼容老设备
     */

    // TODO: 兼容适配

//    const val OUTPUT_MODE_EMULATE_KEY = 1
//    const val OUTPUT_MODE_BROADCAST = 2
//    const val OUTPUT_MODE_FILLING = 3

    const val OUTPUT_MODE_FILLING = 1
    const val OUTPUT_MODE_EMULATE_KEY = 2
    const val OUTPUT_MODE_BROADCAST = 3


    //    const val OUTPUT_MODE_API = 4
    const val OUTPUT_MODE_IP = 5


    const val BROADCAST_OUTPUT_TYPE_SCANNER = 1     //条码
    const val BROADCAST_OUTPUT_TYPE_EXSCANNER = 2   //外置扫描器
    const val BROADCAST_OUTPUT_TYPE_OCR = 3

    val BROADCAST_OUTPUT_TYPE_LIST = listOf(
        BROADCAST_OUTPUT_TYPE_SCANNER,
        BROADCAST_OUTPUT_TYPE_EXSCANNER,
        BROADCAST_OUTPUT_TYPE_OCR
    )


    const val IP_OUTPUT_PROTOCOL_TCP = "TCP"
    const val IP_OUTPUT_PROTOCOL_UDP = "UDP"
    const val IP_OUTPUT_PROTOCOL_HTTP = "http"
    const val IP_OUTPUT_PROTOCOL_HTTPS = "https"

    val IP_OUTPUT_PROTOCOL_LIST = listOf<String>(
        IP_OUTPUT_PROTOCOL_TCP,
        IP_OUTPUT_PROTOCOL_UDP,
        IP_OUTPUT_PROTOCOL_HTTP,
        IP_OUTPUT_PROTOCOL_HTTPS
    )

    const val HTTP_REQUEST_METHOD_GET = "GET"
    const val HTTP_REQUEST_METHOD_POST = "POST"

    val HTTP_REQUEST_METHOD_LIST = listOf<String>(
        HTTP_REQUEST_METHOD_GET,
        HTTP_REQUEST_METHOD_POST
    )


    const val DELETE_AUTO = 1
    const val DELETE_MANUAL = 2



}